package cn.imvc.app.models;

import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.web.util.matcher.RequestMatcher;

import cn.imvc.app.entities.Goods;
import cn.imvc.app.entities.GoodsPrice;
import cn.imvc.app.entities.GoodsSku;
import cn.imvc.data.domain.ViewRequest;

public interface GoodsPriceModel {
LinkedHashMap<RequestMatcher, Collection<ConfigAttribute>> getRequestMap();
	
	Page<GoodsPrice> find(ViewRequest viewRequest);
	
	GoodsPrice get(int id);

	GoodsPrice save(GoodsPrice goodsPrice);
	
	GoodsPrice update(GoodsPrice goodsPrice);

	void delete(int id);

	void deleteBatch(int[] ids);
	
	void updateEmptyPrice(GoodsSku goodsSku);
	
	List<GoodsPrice> findCurSkuPrice(GoodsSku goodsSku);
	
	void deleteByGoods(Goods goods);
	
	void deleteByGoodsSku(GoodsSku goodsSku);
	
	void updatePriceBatch(List<GoodsPrice> goodsPrices,List<Double> prices,int goodsId);
	
	void updateGoodsLowPrice(int id);
	
	List<GoodsPrice> getGoodsPrices(int goodsId);
}
